public class DiscountFruitDecorator extends FruitDecorator {
    public DiscountFruitDecorator(Fruit fruit) {
        super(fruit);
    }

    @Override
    public String getName() {
        return fruit.getName() + "（打折）";
    }

    @Override
    public float getPrice() {
        return fruit.getPrice() * 0.8f;
    }
}
